home *** CD-ROM | disk | FTP | other *** search
- ; WhereIs Commands
- (defun where-is-library (file arg)
- "Find where the Emacs Lisp library FILE is in the current `load-path'.
- By default, appends \".el\" to the filename given, unless FILE already
- ends in \".el\" or \".elc\". If a prefix argument is given, then no
- \".el\" prefix is given."
- (interactive "sWhere is library: \nP")
- (let ((path load-path)
- (file (if (or arg (string-match ".elc?\\'" file))
- file
- (concat file ".el"))))
- (while (and path (not (file-exists-p (concat (car path) "/" file))))
- (setq path (cdr path)))
- (if path
- (message "File %s is in %s." file (car path))
- (message "File %s not found." file))))
- ; -----------------------------------------------------------------------------
-